﻿<UserControl
    x:Class="CodeShow.CS.Shared.StaticResourceDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeShow.CS.Shared"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400"
    x:Name="StaticResourceControl">
    <!--BeginCutPaste-->
    <UserControl.Resources>
        <Style
            TargetType="TextBlock">
            <Setter
                Property="FontSize"
                Value="40" />
            <Setter
                Property="Foreground"
                Value="Black" />
            <Setter 
                Property="HorizontalAlignment" 
                Value="Center" />
            <Setter 
                Property="VerticalAlignment" 
                Value="Center" />
        </Style>
        <Style 
            TargetType="Button" 
            x:Key="MyButtonStyle">
            <Setter 
                Property="Height" 
                Value="80" />
            <Setter 
                Property="Width" 
                Value="320" />
            <Setter 
                Property="Content" 
                Value="Press Me" />
            <Setter 
                Property="HorizontalAlignment" 
                Value="Center" />
            <Setter 
                Property="VerticalAlignment" 
                Value="Center" />
            <Setter 
                Property="Background" 
                Value="Aqua" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <StackPanel VerticalAlignment="Center">
        <Button 
            Style="{StaticResource MyButtonStyle}" 
            Tapped="Button_Tapped" />
            <TextBlock Text="Just My Style" />
        </StackPanel>
    </Grid>
    <!--EndCutPaste-->
</UserControl>
